import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { Menu, Icon } from 'antd';
import styles from './index.less';

const { Item } = Menu;

export default class BlankHeader extends PureComponent {
  static propTypes = {
    onClick: PropTypes.func.isRequired,
  };

  render() {
    const { onClick, children } = this.props;

    return (
      <Menu mode="horizontal" className={styles.header}>
        <Item onClick={onClick}>
          <Icon type="left" />
        </Item>
        <Item disabled className={styles.title}>
          {children}
        </Item>
      </Menu>
    );
  }
}
